package com.kaifamiao.N0718;

import java.util.Scanner;

public class Work3 {

    public static void main(String[] args) {

        // 输出 100 以内的质数/素数  (只能被 1 和 它本身整除数)
        System.out.println("请输入你想要的范围内的质数，从2开始。");

        Scanner sc = new Scanner(System.in);
        int e = sc.nextInt();

        boolean t = true;

        for (int y = 2; y <= e; y++) {
            for (int x = 2; x < y; x++) {
                if (y % x == 0) {
                    t = false;
                }
            }
            if (t == true) {
                System.out.print(y + "\t");
            }
            t = true;
        }
    }
}
